<template>
    <!-- 空调参数 -->
    <custom-dialog title="空调参数" size="small" @dialogClose="dialogClose">
        <div class="kongTiao">
            <div>
                <label>品牌：</label>
                <el-select v-model="ppValue" placeholder="请选择品牌" style="width: 140px; margin-right: 10px">
                    <el-option
                        :label="select.label"
                        :value="select.value.toString()"
                        v-for="(select, sIndex) in ppList"
                        :key="sIndex"
                    ></el-option>
                </el-select>
                <label>型号：</label>
                <el-select v-model="xhValue" placeholder="请选择型号" style="width: 140px">
                    <el-option
                        :label="select.label"
                        :value="select.value.toString()"
                        v-for="(select, sIndex) in xhList"
                        :key="sIndex"
                    ></el-option>
                </el-select>
            </div>
            <div class="border">
                <div class="left">制冷季</div>
                <div class="right">
                    <div>
                        <label>年开机天数：</label>
                        <el-select v-model="kjtsValue" placeholder="请选择年开机天数" style="width: 140px; margin-right: 10px">
                            <el-option
                                :label="select.label"
                                :value="select.value.toString()"
                                v-for="(select, sIndex) in kjtsList"
                                :key="sIndex"
                            ></el-option>
                        </el-select>

                        <span>天</span>
                    </div>
                    <div>
                        <label>每天开机时长：</label>
                        <el-select v-model="kjscValue" placeholder="请选择每天开机时长" style="width: 140px; margin-right: 10px">
                            <el-option
                                :label="select.label"
                                :value="select.value.toString()"
                                v-for="(select, sIndex) in kjscList"
                                :key="sIndex"
                            ></el-option>
                        </el-select>
                        <span>小时</span>
                    </div>
                    <div>
                        <label>电流（标准工况）：</label>
                        <el-input type="number" v-model="dl" style="width: 140px; margin-right: 10px"></el-input>
                        <span>A</span>
                    </div>
                    <div>
                        <label>功率（标准工况）：</label>
                        <el-input type="number" v-model="gl" style="width: 140px; margin-right: 10px"></el-input>
                        <span>W</span>
                    </div>
                </div>
            </div>
            <div class="border">
                <div class="left">制热季</div>
                <div class="right">
                    <div>
                        <label>年开机天数：</label>
                        <el-select v-model="kjtsRValue" placeholder="请选择年开机天数" style="width: 140px; margin-right: 10px">
                            <el-option
                                :label="select.label"
                                :value="select.value.toString()"
                                v-for="(select, sIndex) in kjtsList"
                                :key="sIndex"
                            ></el-option>
                        </el-select>

                        <span>天</span>
                    </div>
                    <div>
                        <label>每天开机时长：</label>
                        <el-select v-model="kjscRValue" placeholder="请选择每天开机时长" style="width: 140px; margin-right: 10px">
                            <el-option
                                :label="select.label"
                                :value="select.value.toString()"
                                v-for="(select, sIndex) in kjscList"
                                :key="sIndex"
                            ></el-option>
                        </el-select>
                        <span>小时</span>
                    </div>
                    <div>
                        <label>电流（标准工况）：</label>
                        <el-input type="number" v-model="dlR" style="width: 140px; margin-right: 10px"></el-input>
                        <span>A</span>
                    </div>
                    <div>
                        <label>功率（标准工况）：</label>
                        <el-input type="number" v-model="glR" style="width: 140px; margin-right: 10px"></el-input>
                        <span>W</span>
                    </div>
                </div>
            </div>
        </div>
        <div style="margin-top: 10px; text-align: right">
            <el-button type="primary" @click="onSave">保存</el-button>
        </div>
    </custom-dialog>
</template>

<script>
import customDialog from '@/components/customComponents/customDialog'
export default {
    props: ['currentNodeId', 'currentNodeName', 'dir'],
    components: {customDialog},
    name: 'kongTiao',
    data() {
        return {
            ppValue: '1',
            ppList: [
                {
                    label: '美的',
                    value: '1'
                },
                {
                    label: '格力',
                    value: '2'
                }
            ],
            xhValue: '1',
            xhList: [
                {
                    label: '型号1',
                    value: '1'
                },
                {
                    label: '型号2',
                    value: '2'
                }
            ],

            kjtsValue: '1',
            kjtsRValue: '1',
            kjtsList: [
                {
                    label: '10',
                    value: '1'
                },
                {
                    label: '20',
                    value: '2'
                },
                {
                    label: '30',
                    value: '3'
                }
            ],
            kjscValue: '1',
            kjscRValue: '1',
            kjscList: [
                {
                    label: '2',
                    value: '1'
                },
                {
                    label: '4',
                    value: '2'
                },
                {
                    label: '6',
                    value: '3'
                }
            ],
            dl: 4.6,
            gl: 980,
            dlR: 6.0,
            glR: 1280,
            close: false
        }
    },
    computed: {},
    created() {},
    methods: {
        onSave() {
            this.dialogClose()
        },
        dialogClose() {
            this.$emit('close', '')
        }
    }
}
</script>

<style scoped lang="scss">
.kongTiao {
    display: flex;
    flex-direction: column;
    gap: 10px;
    div {
        display: flex;
        align-items: center;
    }
    .border {
        border-radius: 4px;
        border: 1px solid #ddd;
        padding: 10px;
        display: flex;
        .left {
            align-items: center;
            justify-content: center;
            width: 180px;
        }
        .right {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            padding-right: 40px;
            div {
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 5px;
                span {
                    width: 30px;
                }
            }
        }
    }
}
</style>
